//
//  PropImg.m
//  yuimall_Iphone
//
//  Created by yuike6 yuike6 on 12-4-16.
//  Copyright (c) 2012年 yuike. All rights reserved.
//

#import "PropImg.h"
#import "header.h"

@implementation PropImg

@synthesize id_;
@synthesize url;

@synthesize properties;
@synthesize position;

@synthesize created;

-(void) dealloc
{
    YRelease(id_)
    YRelease(url)
    
    YRelease(properties)
    YRelease(position)
    
    YRelease(created)
    
    [super dealloc];
}



-(void) privateInit
{
    self.id_ = [NSNumber numberWithDouble:[[self.xmlTree valueAtPath:@"prop_img/id"] doubleValue]];
    self.position = [NSNumber numberWithDouble:[[self.xmlTree valueAtPath:@"prop_img/position"] doubleValue]];
    
    self.url = [self.xmlTree valueAtPath:@"item_img/url"];    
}

-(id) initWithXmlTree:(XMLParsedTree *)tree
{
    self = [super initWithXmlTree:tree];
    if (self) {
        [self privateInit];
    }
    
    return self;
}


-(id) initWithXmlString:(NSString *)xmlString
{
    self = [super initWithXmlString:xmlString];
    if (self) {
        [self privateInit];
    }
    return self;
}

-(id) initWithXmlData:(NSData *)xmlData
{
    self = [super initWithXmlData:xmlData];
    if (self) {
        [self privateInit];
    }
    return self;
}


@end
